﻿using RpcSync.Model;
using RpcSync.Model.DB;

namespace RpcSync.DAL.Repository
{
    internal class DictateNodeDAL : IDictateNodeDAL
    {
        private IRpcExtendResource<DictateNodeModel> _BasicDAL;
        public DictateNodeDAL(IRpcExtendResource<DictateNodeModel> dal)
        {
            _BasicDAL = dal;
        }
        public DictateNode[] GetDictateNode()
        {
            return this._BasicDAL.GetAll(c => new DictateNode
            {
                Id = c.Id,
                Dictate = c.Dictate,
                IsEndpoint = c.IsEndpoint,
                ParentId = c.ParentId
            });
        }
    }
}
